package com.atguigu.gulimall.ware.config;

import com.atguigu.gulimall.ware.inteceptor.LoginUserInterceptor;
import java.util.Arrays;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WareWebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginUserInterceptor()).addPathPatterns("/**").excludePathPatterns(Arrays.asList("/login","/member/member/login", "/testSession", "/getSession"));
    }
}
